<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/demo/promotion/promotion.jsx此处编写
 -->

 
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/demo/promotion/promotion.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'PromotionId',
                footer: "Foots",
                cnName: '转正办理',
                name: 'promotion/promotion',
                url: "/promotion/",
                sortName: "CreateTime"
            });
            const editFormFields = ref({"DepartId":"","PositionId":"","EmployName":"","ResponsiblePerson":"","EntryDate":"","ApplyDate":"","Summarize":"","Opinion":""});
            const editFormOptions = ref([[{"dataKey":"部门上级名称","data":[],"title":"部门","field":"DepartId","type":"select"}],
                              [{"dataKey":"职位管理职位","data":[],"title":"职位","field":"PositionId","type":"select"}],
                              [{"dataKey":"员工姓名","data":[],"title":"员工姓名","field":"EmployName","type":"select"}],
                              [{"dataKey":"上级负责人","data":[],"title":"上级负责人","field":"ResponsiblePerson","type":"select"}],
                              [{"title":"入职日期","field":"EntryDate"}],
                              [{"title":"申请日期","field":"ApplyDate"}],
                              [{"title":"试用期工作总结","field":"Summarize"}],
                              [{"title":"对公司的意见和建议","field":"Opinion"}]]);
            const searchFormFields = ref({});
            const searchFormOptions = ref([]);
            const columns = ref([{field:'PromotionId',title:'转正办理Id',type:'string',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'DepartId',title:'部门',type:'int',bind:{ key:'部门上级名称',data:[]},width:110,align:'left',sort:true},
                       {field:'PositionId',title:'职位',type:'int',bind:{ key:'职位管理职位',data:[]},width:110,align:'left'},
                       {field:'EmployName',title:'员工姓名',type:'string',bind:{ key:'员工姓名',data:[]},width:110,align:'left'},
                       {field:'ResponsiblePerson',title:'上级负责人',type:'string',bind:{ key:'上级负责人',data:[]},width:110,hidden:true,align:'left'},
                       {field:'EntryDate',title:'入职日期',type:'datetime',width:150,hidden:true,align:'left',sort:true},
                       {field:'ApplyDate',title:'申请日期',type:'datetime',width:150,align:'left',sort:true},
                       {field:'Summarize',title:'试用期工作总结',type:'string',width:110,hidden:true,align:'left'},
                       {field:'Opinion',title:'对公司的意见和建议',type:'string',width:110,hidden:true,align:'left'},
                       {field:'ApprovalStatus',title:'审批状态',type:'int',bind:{ key:'入职状态下拉框',data:[]},width:110,align:'left'},
                       {field:'ApprovalPerson',title:'审批人',type:'string',width:110,align:'left'},
                       {field:'IsDelete',title:'是否逻辑删除',type:'int',width:110,hidden:true,align:'left'},
                       {field:'CreateName',title:'创建人',type:'string',width:110,align:'left'},
                       {field:'CreateTime',title:'创建时间',type:'datetime',sort:true,width:150,align:'left',sort:true},
                       {field:'UpdateName',title:'修改人',type:'string',width:110,hidden:true,align:'left'},
                       {field:'UpdateTime',title:'修改时间',type:'datetime',width:150,hidden:true,align:'left',sort:true}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
